import React, { Suspense, useState } from 'react';
import routers from './router/router';
import { useRoutes } from 'react-router-dom';
import Loading from './components/Loading';
import store from './store';
import { Provider } from 'react-redux';

export default function App() {
  const element  = useRoutes(routers);
  const [tabarValue,setTabarValue] = useState('/index/home');
  return (
    <>
    <Provider store={store}>
      <Suspense fallback={  <Loading></Loading> }>
              {element}            
        </Suspense>
    </Provider>
     
    </>
  )
}






